home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4549 < prev    next >
Mailbox/MIME Entity  |  1996-08-06  |  1.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 6e 65 77 73 2e 6e 65 72 | 2e 62 62 6e 70 6c 61 6e |news.ner|.bbnplan|
|00000030| 65 74 2e 6e 65 74 21 61 | 72 63 6f 21 75 73 65 6e |et.net!a|rco!usen|
|00000040| 65 74 0a 46 72 6f 6d 3a | 20 42 72 69 61 6e 20 4c |et.From:| Brian L|
|00000050| 65 61 63 68 20 3c 6c 61 | 73 62 66 6c 3e 0a 53 75 |each <la|sbfl>.Su|
|00000060| 62 6a 65 63 74 3a 20 52 | 65 3a 20 77 65 69 72 64 |bject: R|e: weird|
|00000070| 20 62 65 68 61 76 69 6f | 72 0a 58 2d 4e 6e 74 70 | behavio|r.X-Nntp|
|00000080| 2d 50 6f 73 74 69 6e 67 | 2d 48 6f 73 74 3a 20 31 |-Posting|-Host: 1|
|00000090| 33 36 2e 32 32 36 2e 31 | 31 36 2e 31 0a 43 6f 6e |36.226.1|16.1.Con|
|000000a0| 74 65 6e 74 2d 54 79 70 | 65 3a 20 74 65 78 74 2f |tent-Typ|e: text/|
|000000b0| 70 6c 61 69 6e 3b 20 63 | 68 61 72 73 65 74 3d 75 |plain; c|harset=u|
|000000c0| 73 2d 61 73 63 69 69 0a | 4d 65 73 73 61 67 65 2d |s-ascii.|Message-|
|000000d0| 49 44 3a 20 3c 44 4d 30 | 45 44 76 2e 39 74 46 40 |ID: <DM0|EDv.9tF@|
|000000e0| 6e 65 77 73 2e 61 72 63 | 6f 2e 63 6f 6d 3e 0a 54 |news.arc|o.com>.T|
|000000f0| 6f 3a 20 67 75 73 74 61 | 76 6f 2e 73 61 6e 64 6f |o: gusta|vo.sando|
|00000100| 76 61 6c 40 63 73 75 73 | 2e 65 64 75 0a 53 65 6e |val@csus|.edu.Sen|
|00000110| 64 65 72 3a 20 75 73 65 | 6e 65 74 40 6e 65 77 73 |der: use|net@news|
|00000120| 2e 61 72 63 6f 2e 63 6f | 6d 0a 43 6f 6e 74 65 6e |.arco.co|m.Conten|
|00000130| 74 2d 54 72 61 6e 73 66 | 65 72 2d 45 6e 63 6f 64 |t-Transf|er-Encod|
|00000140| 69 6e 67 3a 20 37 62 69 | 74 0a 4f 72 67 61 6e 69 |ing: 7bi|t.Organi|
|00000150| 7a 61 74 69 6f 6e 3a 20 | 41 52 43 4f 20 4f 69 6c |zation: |ARCO Oil|
|00000160| 20 25 20 47 61 73 20 43 | 6f 6d 70 61 6e 79 0a 52 | % Gas C|ompany.R|
|00000170| 65 66 65 72 65 6e 63 65 | 73 3a 20 3c 34 65 64 31 |eference|s: <4ed1|
|00000180| 30 6c 24 6a 61 70 40 6e | 65 77 73 2e 63 73 75 73 |0l$jap@n|ews.csus|
|00000190| 2e 65 64 75 3e 0a 4d 69 | 6d 65 2d 56 65 72 73 69 |.edu>.Mi|me-Versi|
|000001a0| 6f 6e 3a 20 31 2e 30 0a | 44 61 74 65 3a 20 54 75 |on: 1.0.|Date: Tu|
|000001b0| 65 2c 20 33 30 20 4a 61 | 6e 20 31 39 39 36 20 31 |e, 30 Ja|n 1996 1|
|000001c0| 39 3a 33 34 3a 34 33 20 | 47 4d 54 0a 58 2d 4d 61 |9:34:43 |GMT.X-Ma|
|000001d0| 69 6c 65 72 3a 20 4d 6f | 7a 69 6c 6c 61 20 31 2e |iler: Mo|zilla 1.|
|000001e0| 31 4e 20 28 58 31 31 3b | 20 49 3b 20 48 50 2d 55 |1N (X11;| I; HP-U|
|000001f0| 58 20 41 2e 30 39 2e 30 | 35 20 39 30 30 30 2f 37 |X A.09.0|5 9000/7|
|00000200| 35 35 29 0a 58 2d 55 72 | 6c 3a 20 6e 65 77 73 3a |55).X-Ur|l: news:|
|00000210| 34 65 64 31 30 6c 24 6a | 61 70 40 6e 65 77 73 2e |4ed10l$j|ap@news.|
|00000220| 63 73 75 73 2e 65 64 75 | 0a 0a 67 75 73 74 61 76 |csus.edu|..gustav|
|00000230| 6f 2e 73 61 6e 64 6f 76 | 61 6c 40 63 73 75 73 2e |o.sandov|al@csus.|
|00000240| 65 64 75 20 28 67 75 73 | 74 61 76 6f 20 73 61 6e |edu (gus|tavo san|
|00000250| 64 6f 76 61 6c 29 20 77 | 72 6f 74 65 3a 0a 3e 49 |doval) w|rote:.>I|
|00000260| 20 68 61 76 65 20 74 68 | 65 20 66 6f 6c 6c 6f 77 | have th|e follow|
|00000270| 69 6e 67 20 6c 69 6e 6b | 65 64 20 6c 69 73 74 20 |ing link|ed list |
|00000280| 77 68 69 63 68 20 49 27 | 6d 20 70 6c 61 79 69 6e |which I'|m playin|
|00000290| 67 20 61 72 6f 75 6e 64 | 20 77 69 74 68 3a 0a 3e |g around| with:.>|
|000002a0| 0a 3e 63 6c 61 73 73 20 | 43 4c 69 73 74 0a 3e 7b |.>class |CList.>{|
|000002b0| 0a 3e 70 75 62 6c 69 63 | 3a 0a 3e 20 20 20 43 4c |.>public|:.> CL|
|000002c0| 69 73 74 28 29 3b 20 0a | 3e 20 20 20 7e 43 4c 69 |ist(); .|> ~CLi|
|000002d0| 73 74 28 29 3b 0a 3e 0a | 3e 20 20 20 76 6f 69 64 |st();.>.|> void|
|000002e0| 20 49 6e 73 65 72 74 28 | 69 6e 74 20 65 6c 65 6d | Insert(|int elem|
|000002f0| 65 6e 74 29 3b 0a 3e 20 | 20 20 76 6f 69 64 20 50 |ent);.> | void P|
|00000300| 72 69 6e 74 20 28 29 3b | 0a 3e 0a 3e 20 20 20 2f |rint ();|.>.> /|
|00000310| 2f 20 52 65 74 75 72 6e | 73 20 74 68 65 20 6e 75 |/ Return|s the nu|
|00000320| 6d 62 65 72 20 6f 72 20 | 69 74 65 6d 73 20 64 65 |mber or |items de|
|00000330| 6c 65 74 65 64 0a 3e 20 | 20 20 69 6e 74 20 20 44 |leted.> | int D|
|00000340| 65 6c 65 74 65 28 69 6e | 74 20 74 61 72 67 65 74 |elete(in|t target|
|00000350| 29 3b 0a 3e 20 20 20 0a | 3e 70 72 69 76 61 74 65 |);.> .|>private|
|00000360| 3a 0a 3e 20 20 20 43 49 | 74 65 6d 2a 20 68 65 61 |:.> CI|tem* hea|
|00000370| 64 3b 0a 3e 0a 3e 7d 3b | 2f 2f 20 43 4c 69 73 74 |d;.>.>};|// CList|
|00000380| 0a 3e 0a 3e 2f 2f 20 49 | 6d 70 6c 65 6d 65 6e 74 |.>.>// I|mplement|
|00000390| 61 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 66 75 6e |ation of| the fun|
|000003a0| 63 74 69 6f 6e 73 20 6f | 6d 69 74 74 65 64 20 0a |ctions o|mitted .|
|000003b0| 3e 0a 3e 2f 2f 20 49 6e | 20 6d 61 69 6e 20 49 20 |>.>// In| main I |
|000003c0| 68 61 76 65 3a 0a 3e 0a | 3e 76 6f 69 64 20 6d 61 |have:.>.|>void ma|
|000003d0| 69 6e 20 28 29 0a 3e 7b | 0a 3e 20 20 20 43 4c 69 |in ().>{|.> CLi|
|000003e0| 73 74 20 4d 79 4c 69 73 | 74 3b 0a 3e 0a 3e 20 20 |st MyLis|t;.>.> |
|000003f0| 20 66 6f 72 20 28 69 6e | 74 20 78 20 3d 20 30 3b | for (in|t x = 0;|
|00000400| 20 78 20 3c 20 31 30 3b | 20 78 2b 2b 20 29 0a 3e | x < 10;| x++ ).>|
|00000410| 20 20 20 20 20 20 4d 79 | 4c 69 73 74 2e 49 6e 73 | My|List.Ins|
|00000420| 65 72 74 20 28 78 2a 31 | 30 29 3b 0a 3e 0a 3e 20 |ert (x*1|0);.>.> |
|00000430| 20 20 4d 79 4c 69 73 74 | 2e 50 72 69 6e 74 28 29 | MyList|.Print()|
|00000440| 3b 0a 3e 0a 3e 20 20 20 | 69 6e 74 20 63 6f 75 6e |;.>.> |int coun|
|00000450| 74 20 3d 20 4d 79 4c 69 | 73 74 2e 44 65 6c 65 74 |t = MyLi|st.Delet|
|00000460| 65 20 28 34 30 29 3b 0a | 3e 0a 3e 20 20 20 4d 79 |e (40);.|>.> My|
|00000470| 4c 69 73 74 2e 49 6e 73 | 65 72 74 20 28 35 30 29 |List.Ins|ert (50)|
|00000480| 3b 0a 3e 20 20 20 4d 79 | 4c 69 73 74 2e 49 6e 73 |;.> My|List.Ins|
|00000490| 65 72 74 3b 20 20 20 20 | 20 20 20 20 20 20 20 2f |ert; | /|
|000004a0| 2f 20 3c 3d 3d 20 74 68 | 69 73 20 6c 69 6e 65 73 |/ <== th|is lines|
|000004b0| 0a 3e 20 20 20 4d 79 4c | 69 73 74 2e 50 72 69 6e |.> MyL|ist.Prin|
|000004c0| 74 3b 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2f |t; | //|
|000004d0| 20 3c 3d 3d 20 74 68 69 | 73 20 6c 69 6e 65 73 0a | <== thi|s lines.|
|000004e0| 3e 0a 3e 20 20 20 63 6f | 75 6e 74 20 3d 20 4d 79 |>.> co|unt = My|
|000004f0| 4c 69 73 74 2e 44 65 6c | 65 74 65 20 28 35 30 29 |List.Del|ete (50)|
|00000500| 3b 0a 3e 0a 3e 7d 0a 3e | 0a 3e 0a 3e 6e 6f 74 65 |;.>.>}.>|.>.>note|
|00000510| 20 74 68 65 20 6c 69 6e | 65 73 20 77 69 74 68 20 | the lin|es with |
|00000520| 74 68 65 20 61 72 72 6f | 77 73 2e 20 20 54 68 65 |the arro|ws. The|
|00000530| 20 63 6f 64 65 20 63 6f | 6d 70 69 6c 65 73 20 69 | code co|mpiles i|
|00000540| 6e 20 56 43 20 34 2e 30 | 20 77 69 74 68 6f 75 74 |n VC 4.0| without|
|00000550| 20 77 61 72 6e 69 6e 67 | 73 20 0a 3e 69 6e 20 6c | warning|s .>in l|
|00000560| 65 76 65 6c 20 34 20 6f | 72 20 65 72 72 6f 72 73 |evel 4 o|r errors|
|00000570| 2e 20 20 57 68 65 6e 20 | 49 20 73 74 65 70 20 74 |. When |I step t|
|00000580| 68 72 6f 75 67 68 20 74 | 68 6f 73 65 20 74 77 6f |hrough t|hose two|
|00000590| 20 6c 69 6e 65 73 20 74 | 68 65 20 64 65 62 75 67 | lines t|he debug|
|000005a0| 67 65 72 20 6a 75 73 74 | 20 0a 3e 67 6f 65 73 20 |ger just| .>goes |
|000005b0| 72 69 67 68 74 20 62 79 | 2e 20 20 0a 0a 47 75 73 |right by|. ..Gus|
|000005c0| 74 61 76 6f 2c 0a 0a 59 | 6f 75 20 73 68 6f 75 6c |tavo,..Y|ou shoul|
|000005d0| 64 20 62 65 20 67 65 74 | 74 69 6e 67 20 63 6f 6d |d be get|ting com|
|000005e0| 70 69 6c 65 20 65 72 72 | 6f 72 73 2e 20 49 66 20 |pile err|ors. If |
|000005f0| 49 20 68 61 76 65 20 72 | 65 61 64 20 74 68 69 73 |I have r|ead this|
|00000600| 20 63 6f 72 72 65 63 74 | 6c 79 2c 20 79 6f 75 20 | correct|ly, you |
|00000610| 68 61 76 65 0a 74 77 6f | 20 6c 69 6e 65 73 20 77 |have.two| lines w|
|00000620| 68 69 63 68 20 63 6f 6e | 73 69 73 74 20 6f 66 20 |hich con|sist of |
|00000630| 66 75 6e 63 74 69 6f 6e | 73 20 70 6f 69 6e 74 65 |function|s pointe|
|00000640| 72 73 2e 20 41 64 64 20 | 74 68 65 20 27 28 29 27 |rs. Add |the '()'|
|00000650| 20 66 75 6e 63 74 69 6f | 6e 20 6f 70 65 72 61 74 | functio|n operat|
|00000660| 6f 72 2c 0a 61 6e 64 20 | 79 6f 75 20 73 68 6f 75 |or,.and |you shou|
|00000670| 6c 64 20 67 65 74 20 79 | 6f 75 72 20 69 6e 74 65 |ld get y|our inte|
|00000680| 6e 64 65 64 20 62 65 68 | 61 76 69 6f 75 72 2c 20 |nded beh|aviour, |
|00000690| 61 6c 74 68 6f 75 67 68 | 20 79 6f 75 20 61 72 65 |although| you are|
|000006a0| 20 73 74 69 6c 6c 20 6d | 69 73 73 69 6e 67 20 0a | still m|issing .|
|000006b0| 74 68 65 20 69 6e 74 65 | 67 72 61 6c 20 61 72 67 |the inte|gral arg|
|000006c0| 75 6d 65 6e 74 20 66 6f | 72 20 74 68 65 20 49 6e |ument fo|r the In|
|000006d0| 73 65 72 74 20 66 75 6e | 63 74 69 6f 6e 2e 0a 0a |sert fun|ction...|
|000006e0| 2d 42 72 69 61 6e 20 3a | 2d 29 0a 0a |-Brian :|-).. |
+--------+-------------------------+-------------------------+--------+--------+